package com.example.hxds.bff.customer.fegin;

import cn.hutool.core.bean.BeanUtil;
import com.example.hxds.bff.customer.controller.form.*;
import com.example.hxds.common.util.R;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.Map;

@FeignClient(value = "hxds-vhr")
public interface VhrServiceApi {

    @PostMapping("/voucher/customer/useVoucher")
    //检查可否使用代金券
    public R useVoucher(@RequestBody @Valid UseVoucherForm form);


    //查询未领取代金券的分页
    @PostMapping("/voucher/searchUnTakeVoucherByPage")
    public R searchUnTakeVoucherByPage(@RequestBody @Valid SearchUnTakeVoucherByPageForm form);

    //查询未使用代金券的分页
    @PostMapping("/voucher/searchUnUseVoucherByPage")
    public R searchUnUseVoucherByPage(@RequestBody @Valid SearchUnUseVoucherByPageForm form);

    //查询已使用代金券的分页
    @PostMapping("/voucher/searchUsedVoucherByPage")
    public R searchUsedVoucherByPage(@RequestBody @Valid SearchUsedVoucherByPageForm form);

    //查询未使用代金券数量
    @PostMapping("/voucher/searchUnUseVoucherCount")
    public R searchUnUseVoucherCount(@RequestBody SearchUnUseVoucherCountForm form);

    //领取代金券
    @PostMapping("/voucher/takeVoucher")
    public R takeVoucher(@RequestBody @Valid TakeVoucherForm form);

    //查询未使用的最佳代金券
    @PostMapping("/voucher/searchBestUnUseVoucher")
    public R searchBestUnUseVoucher(@RequestBody @Valid SearchBestUnUseVoucherForm form);

}